package xyz.xtt.activity.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import xyz.xtt.activity.entity.TblMissAsiaPk;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;


/**
 * @author wangqi
 */
public interface TblMissAsiaPkMapper extends BaseMapper<TblMissAsiaPk> {
    @Select("SELECT * FROM `tbl_miss_asia_pk` WHERE `challenger` = #{goodsId} and pk_status = 0")
    List<TblMissAsiaPk> findChallengerList(String goodsId);

    @Select("SELECT * FROM `tbl_miss_asia_pk` WHERE `acceptor` = #{goodsId} and pk_status = 0")
    List<TblMissAsiaPk> findAcceptorList(String goodsId);

    @Update("UPDATE `tbl_miss_asia_pk` SET `challenger_hotness` = #{challengerAmount} WHERE id = #{id}")
    void updateChallengerHotness(String id, String challengerAmount);
    @Update("UPDATE `tbl_miss_asia_pk` SET `acceptor_hotness` = #{acceptorAmount} WHERE id = #{id}")
    void updateAcceptorHotness(String id, String acceptorAmount);
}
